Systems for performing communication between a master and a slave through a bus have been proposed. For such systems, there are lots of communication protocols using a synchronization signal. The slave monitors a waveform of the bus and determines whether a signal transmitted through the bus is a synchronization signal.
For example, one of communication protocols for in-vehicle local area network (LAN) is local interconnected network (LIN). According to the LIN specification, the header of the frame transmitted by the master contains a Synch Break Field, a high level bit following the Synch Break Field, and a Synch Field following the high level bit. The Synch Break Field has at least 11 bits of low level. The Synch Field has the data “0x55”. As described in, for example, US 2009/0323877 corresponding to JP 2009-303178, the Synch Field is followed by an Identifier Field and a Data Field. In the slave, a baud rate is calculated by calculating one-bit period using a reference clock.
In US 2009/0323877, the measurement value of bit made by the timer is sequentially transmitted to the first through fourth memories. The measurement values stored in these memories are compared by the first through third comparators. The Synch Break and the Synch Field are detected based on the comparison results.
Specifically, according to the first embodiment disclosed in US 2009/0323877, the first comparator compares the measurement value stored in the second memory with the measurement value stored in the third memory. Then, when the ratio between the measurement values is 11 or more, it is determined that the first condition is met. Further, the second comparator compares the measurement value stored in the first memory with the measurement value stored in the second memory. Then, when the difference between the measurement values is within the margin of error, it is determined that the second condition is met. When both the first condition and the second condition are met, it is determined that the Synch Break and the Synch Field are detected. The baud rate calculator calculates the baud rate by calculating the reciprocal of the value that is obtained by multiplying the resolution by the measurement value W20 stored in the second memory.
Further, according to the second embodiment disclosed in US 2009/0323877, the first comparator compares the measurement value stored in the third memory with the measurement value stored in the fourth memory. Then, when the ratio between the measurement values is 11 or more, it is determined that the first condition is met. Further, the second comparator compares the measurement value stored in the second memory with the measurement value stored in the third memory. Then, when the difference between the measurement values is within the margin of error, it is determined that the second condition is met. Furthermore, the third comparator compares the measurement value stored in the first memory with the measurement value stored in the third memory. Then, when the difference between the measurement values is within the margin of error, it is determined that the third condition is met. When all the first, second, and third conditions are met, it is determined that the Synch Break and the Synch Field are detected. The average calculator stores the average of the measurements of the widths of three low level pulses. The baud rate calculator calculates the baud rate by calculating the reciprocal of the value that is obtained by multiplying the resolution by the average pulse width, thereby reducing measurement errors.
However, the technique disclosed in US 2009/0323877 requires a large memory and a lot of computations. Therefore, to achieve the technique by hardware, a circuit has a large size.
Such a technique is disclosed in US/20060245515 corresponding to JP 4327764, US 2008/0276023 corresponding to JP 2008-518497, US 2003/0103584 corresponding to JP 2006-503446, and JP 2005-277994. For example, in US/20060245515, the period of the second level before the period of the first level is defined as the first period, and the period of the second level after the period of the first level is defined as the second period. When the ratio between the first and second periods is equal to or greater than the predetermined value, the signal following the second period is determined as the synchronization signal, and the reciprocal of the second period is determined as the baud rate.
However, according to the technique disclosed in US/20060245515, the signal following the second period is determined as the synchronization signal, even if the synchronization signal does not satisfy the communication protocol specification (i.e., 0x55h). Therefore, incorrect data transmission may occur. Further, since the reciprocal of the second period is determined as the baud rate, the baud rate may have error.